package cn.stylefeng.guns.modular.api.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@SuppressWarnings("rawtypes")
@ApiModel
public class ExpertDTO implements Comparable{

	public ExpertDTO(String title, String name, String rank, String picUrl, String value, Integer pri, String pageType) {
		this.title = title;
		this.name = name;
		this.rank = rank;
		this.picUrl = picUrl;
		this.value = value;
		this.pri = pri;
		this.pageType = pageType;
	}
	
	@ApiModelProperty("标题")
	private String title;
	@ApiModelProperty("姓名")
	private String name;
	@ApiModelProperty("职称")
	private String rank;
	@ApiModelProperty("头像图片地址")
	private String picUrl;
	@ApiModelProperty("点击跳转ID")
	private String value;
	@ApiModelProperty("排序号")
	private Integer pri;
	@ApiModelProperty("页面类型")
	String pageType;
	
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getRank() {
		return rank;
	}

	public void setRank(String rank) {
		this.rank = rank;
	}

	public String getPicUrl() {
		return picUrl;
	}

	public void setPicUrl(String picUrl) {
		this.picUrl = picUrl;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}
	
	public Integer getPri() {
		return pri;
	}

	public void setPri(Integer pri) {
		this.pri = pri;
	}

	public String getPageType() {
		return pageType;
	}

	public void setPageType(String pageType) {
		this.pageType = pageType;
	}

	@Override
	public int compareTo(Object o) {
		if(o instanceof ExpertDTO){
			ExpertDTO emp = (ExpertDTO) o;
			return this.pri.compareTo(emp.pri);
        }
		return 0;
	}
	
}
